using System.Xml.Serialization;
using uTILLIty.Rave.Contract.Configuration;
using uTILLIty.Rave.Core.Schema;

namespace uTILLIty.Rave.Core.StorageAdapter
{
	/// <summary>
	/// Additional information required by the <see cref="NtfsStorageAdapter"/> to help
	/// resolve the member within LDAP/AD
	/// </summary>
  [XmlRoot(Namespace = WellKnownSchemas.RaveNtfsConfiguration, IsNullable = false)]
  public class MemberAdditionalInformation
  {

    /// <summary>
    /// A limiting scope or filter-expression interpreted by the underlying credential store
    /// applied when searching for the <see cref="Member.Identifier"/>
    /// </summary>
    public string AdditionalFilter { get; set; }

		/// <summary>
		/// An optional LDAP connection string
		/// </summary>
		/// <example>LDAP://DC=localdomain,DC=com</example>
		/// <seealso cref="LdapConnectionUser"/>
		/// <seealso cref="LdapConnectionPassword"/>
		public string LdapConnectionString { get; set; }

		/// <summary>
		/// An optional username to connect to the LDAP server with
		/// </summary>
		/// <remarks>
		/// If this is set, a <see cref="LdapConnectionPassword">password</see> must also be supplied
		/// </remarks>
		/// <seealso cref="LdapConnectionPassword"/>
		/// <seealso cref="LdapConnectionString"/>
  	public string LdapConnectionUser { get; set; }

		/// <summary>
		/// An optional password to use to connect to the LDAP server
		/// </summary>
		/// <remarks>
		/// If this is set, a <see cref="LdapConnectionUser">username</see> must also be supplied
		/// </remarks>
		/// <seealso cref="LdapConnectionUser"/>
		/// <seealso cref="LdapConnectionString"/>
		public string LdapConnectionPassword { get; set; }

  }
}